package com.ruoyi.tb.lmt.controller;

import cn.dev33.satoken.annotation.SaIgnore;
import cn.hutool.json.JSONArray;
import com.ruoyi.common.core.domain.R;
import lombok.RequiredArgsConstructor;
import com.ruoyi.tb.lmt.service.ITableColumnSyncService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @author: jiaxiufeng
 * @description:
 * @create: 2023/11/28 08:38
 **/
@SaIgnore
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/table/column")
public class TableColumnSync {
    @Autowired
    ITableColumnSyncService tableColumnSyncService;
    @RequestMapping("/sync")
    public R<Map<String,Object>> sync(){
       return R.ok(tableColumnSyncService.sync());
    }

    @RequestMapping("/commit")
    public R<Map<String,Object>> commit(){
        return R.ok(tableColumnSyncService.commit());
    }
}
